import request from '@/utils/request'

// 创建首营品种
export function createFirstOperation(data) {
  return request({
    url: '/gsp/first-operation/create',
    method: 'post',
    data: data
  })
}

// 更新首营品种
export function updateFirstOperation(data) {
  return request({
    url: '/gsp/first-operation/update',
    method: 'put',
    data: data
  })
}

// 删除首营品种
export function deleteFirstOperation(id) {
  return request({
    url: '/gsp/first-operation/delete?id=' + id,
    method: 'delete'
  })
}

// 获得首营品种
export function getFirstOperation(id) {
  return request({
    url: '/gsp/first-operation/get?id=' + id,
    method: 'get'
  })
}

// 获得首营品种分页
export function getFirstOperationPage(query) {
  return request({
    url: '/gsp/first-operation/page',
    method: 'get',
    params: query
  })
}

// 导出首营品种 Excel
export function exportFirstOperationExcel(query) {
  return request({
    url: '/gsp/first-operation/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
